<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Cm Shop Apis </title>
<style >
.gotop{float:right; font-weight:bold;}
.fieldstable{}
</style>
</head>

<body>
<div> <a name="top"></a>
<ul>
	<li><a href="#GetSessionID">GetSessionID</a></li>
	<li><a href="#AddItem">AddItem</a></li>
	<li><a href="#GetOrderTransaction">GetOrderTransaction</a></li>
	<li><a href="#GetTags">GetTags</a></li>	
</ul>
</div>

<h3><a name="GetSessionID">GetSessionID</a></h3>
<div><p> 请求 session  </p></div>
<h4><a name="GetSessionIDRequest">GetSessionIDRequest</a></h4>
<div><p> 请求 session  这是唯一的 免  usertoken 的 api.</p></div>
<table width="98%" border="1" class="fieldstable">
  <tr>
    <th scope="col" width="150">字段名</th>
    <th scope="col" width="150">字段属性</th>
    <th scope="col" >详细</th>
  </tr>
  <tr>
    <td>(无)</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<p>&nbsp;</p>
<h4><a name="GetSessionIDResponse">GetSessionIDResponse</a></h4>
<table width="98%" border="1">
  <tr>
    <th scope="col" width="150">字段名</th>
    <th scope="col" width="150">字段属性</th>
    <th scope="col" >详细</th>
  </tr>
  <tr>
    <td>Ack</td>
    <td>str</td>
    <td>Success ,成功 . Fail 失败</td>
  </tr>
  <tr>
    <td>SessionID</td>
    <td>str</td>
    <td> 使用这个 SessionID 向 cmshop 请求 token  </td>
  </tr>
  <tr>
    <td>hardexpirationtime</td>
    <td>time</td>
    <td> session 过期时间  </td>
  </tr>
</table>
<div> <a href="#top" class="gotop">^Top</a> 
	<hr />
</div>
<h3><a name="AddItem">AddItem</a></h3>
<div><p>  上货 </p></div>
<h4><a name="AddItemRequest">AddItemRequest</a></h4>
<div><p> 上货的 api.</p></div>
<table width="98%" border="1">
  <tr>
    <th scope="col" width="150">字段名</th>
    <th scope="col" width="150">字段属性</th>
	<th scope="col" width="100">必需</th>
    <th scope="col" >详细</th>
  </tr>
  <tr>
    <td>sn</td>
    <td>Str(100)</td>
	<td>Y</td>
    <td>商品编号 , 必需,且要具有唯一性.不可与你的店铺中的 其它 商品共用一个编号.</td>
  </tr>
  <tr>
    <td>price</td>
    <td>float</td>
	<td>Y</td>
    <td>价格,货币单位,在 店铺中已设,这里不会再进行转换.</td>
  </tr>
  <tr>
    <td>market_price</td>
    <td>float</td>
	<td>N</td>
    <td>市场价,给客户看到 购买价格 有多大的优惠 .</td>
  </tr>
  <tr>
    <td>currency</td>
    <td>str(20)</td>
	<td>Y</td>
    <td> 货币 </td>
  </tr>
  <tr>
    <td>weight</td>
    <td>float (g) </td>
	<td>Y</td>
    <td>重量,单位 g.</td>
  </tr>
  <tr>
    <td>add_stock</td>
    <td>int</td>
	<td>Y</td>
    <td>库存 .</td>
  </tr>
  <tr>
    <td>category</td>
    <td>int</td>
	<td>N</td>
    <td>商品分类,必需是 叶子Id, 如果 未填. 商品属于未分类</td>
  </tr>
  <tr>
    <td>tag</td>
    <td>str(200)</td>
	<td>N</td>
    <td>商品的Tag, 可以设 商品的标签. 标签 必需已在商铺中,不可 设未存在的Tag. </td>
  </tr>
  <tr>
    <td>image_url</td>
    <td>str(200)</td>
	<td>N</td>
    <td> 引用商品图片  </td>
  </tr>
  <tr>
    <td> custom</td>
    <td>str(200)</td>
	<td>N</td>
    <td> 用户自定义字段,用于订单回馈时的主标识 </td>
  </tr>
  <tr>
    <td>language_desc</td>
    <td> array(), 多行 </td>
	<td>Y</td>
    <td> 语言字段 , 一种语言 一行 .  </td>
  </tr>
  <tr>
    <td>language_desc.language_code</td>
    <td>language_code </td>
	<td>Y</td>
    <td> en,de,cn . language_code 支持,需店铺支持 . 可以为空, 将用店铺默认 语言 </td>
  </tr>
  <tr>
    <td>language_desc.title</td>
    <td>str(200) </td>
	<td>Y</td>
    <td>  商品名 </td>
  </tr>
  <tr>
    <td>language_desc.desc</td>
    <td>str(25000) </td>
	<td>Y</td>
    <td> 商品名 详细 </td>
  </tr>
  <tr>
    <td>language_desc.property</td>
    <td>str(25000) </td>
	<td>N</td>
    <td> 商品属性 . 如: <br />
propCode_propName: code1_value1+12| code2_value2+20; ... , </td>
  </tr>
  <tr>
    <td>language_desc.introduction</td>
    <td>str(2000) </td>
	<td>N</td>
    <td> 商品简介 </td>
  </tr>
</table>
<p>&nbsp;</p>
<h4><a name="AddItemResponse">AddItemResponse</a></h4>
<table width="98%" border="1">
  <tr>
    <th scope="col" width="150">字段名</th>
    <th scope="col" width="150">字段属性</th>
	<th scope="col" width="100">必需</th>
    <th scope="col" >详细</th>
  </tr>
  <tr>
    <td>Ack</td>
    <td>str</td>
	<td>Y</td>
    <td>Success ,成功 . Fail 失败</td>
  </tr>
  <tr>
    <td>item_id</td>
    <td>str</td>
    <td>int(20)</td>
	<td> 店内商品编号 </td>
  </tr>
  <tr>
    <td>created</td>
    <td>time</td>
	<td>time</td>
    <td> 时间  </td>
  </tr>
</table>
<div> <a href="#top" class="gotop">^Top</a> 
	<hr />
</div>
<h3><a name="GetOrderTransaction">GetOrderTransaction</a></h3>
<div><p>  读回订单 </p></div>
<h4><a name="GetOrderTransactionRequest">GetOrderTransactionRequest</a></h4>
<div><p> 读回订单 api.</p></div>
<table width="98%" border="1">
  <tr>
    <th scope="col" width="150">字段名</th>
    <th scope="col" width="150">字段属性</th>
	<th scope="col" width="100">必需</th>
    <th scope="col" >详细</th>
  </tr>
  <!--tr>
    <td>item_id</td>
    <td>int(20)</td>
	<td>Optional</td>
    <td>店内商品编号. 可选 用商品id 取 订单,如果 数量多,请指定 pagenumber</td>
  </tr>
  <tr>
    <td>detail_level</td>
    <td>  </td>
	<td>N</td>
    <td>all (默认). <br />
		number ,只读回数量  <br />
		order_id, 只读回 order_id 集合,不读详细 .
	</td>
  </tr>
  <tr>
    <td>page_number</td>
    <td>int(5)</td>
	<td>N</td>
    <td>如果 有多个order,请指定pagenumber , 默认为 1 .</td>
  </tr-->
  <tr>
    <td>order_id</td>
    <td>int(20)</td>
	<td>Optional</td>
    <td> 订单号 .</td>
  </tr>
</table>
<p>&nbsp;</p>
<h4><a name="GetOrderTransactionResponse">GetOrderTransactionResponse</a></h4>
<table width="98%" border="1">
  <tr>
    <th scope="col" width="150">字段名</th>
    <th scope="col" width="150">字段属性</th>
	<th scope="col" width="100">必需</th>
    <th scope="col" >详细</th>
  </tr>
  <tr>
    <td>ack</td>
    <td>str</td>
	<td>Y</td>
    <td>Success ,成功 . Fail 失败</td>
  </tr>
  <tr>
    <td>order_id</td>
    <td>int(20)</td>
	<td>Y</td>
    <td> order_id 编号 </td>
  </tr>
  <tr>
    <td>store_name</td>
    <td>int(20)</td>
	<td>Y</td>
    <td> 店铺 名 </td>
  </tr>
  <tr>
    <td>total_amount</td>
    <td>float</td>
	<td>Y</td>
    <td> 商品总价 </td>
  </tr>
  <tr>
    <td>finel_amount</td>
    <td>float</td>
	<td>Y</td>
    <td> 全部总价 </td>
  </tr>
  <tr>
    <td>shipping_cost</td>
    <td>float</td>
	<td>Y</td>
    <td> 运费 </td>
  </tr>
  <tr>
    <td>currency</td>
    <td>str(20)</td>
	<td>Y</td>
    <td> 货币 </td>
  </tr>
  <tr>
    <td>paid_time</td>
    <td> time</td>
	<td>Y</td>
    <td> 付款时间 </td>
  </tr>
  <tr>
    <td>status_payment</td>
    <td>str(20)</td>
	<td>N</td>
    <td> 状态:支付 </td>
  </tr>
  <tr>
    <td>status_shipment</td>
    <td>str(20)</td>
	<td>N</td>
    <td> 状态:发货 </td>
  </tr>
  <tr>
    <td>payment</td>
    <td>str(20)</td>
	<td>N</td>
    <td> 支付方式 </td>
  </tr>
  <tr>
    <td>shipment</td>
    <td>str(20)</td>
	<td>N</td>
    <td>配送方式 </td>
  </tr>
  <tr>
    <td>transactions</td>
    <td>array(), 多行 </td>
	<td>Y</td>
    <td>  transactions ,transaction 集合 </td>
  </tr>
  <tr>
    <td>transactions.transaction</td>
    <td>array(),单行 </td>
	<td>Y</td>
    <td> transaction </td>
  </tr>
  <tr>
    <td>transactions.transaction.transaction_id</td>
    <td> int(20) </td>
	<td>Y</td>
    <td> transaction_id </td>
  </tr>
  <tr>
    <td>transactions.transaction.item</td>
    <td>array(),item </td>
	<td>Y</td>
    <td> 店内商品 </td>
  </tr>
  <tr>
    <td>transactions.transaction.item.item_id</td>
    <td>int(20)</td>
	<td>Y</td>
    <td> 店内商品,item_id </td>
  </tr>
  <tr>
    <td>transactions.transaction.item.sn</td>
    <td>str(100)</td>
	<td>Y</td>
    <td> 店内商品,SN </td>
  </tr>
   
  <tr>
    <td>transactions.transaction.item.status</td>
    <td>str(20)</td>
	<td>Y</td>
    <td> 店内商品,状态 </td>
  </tr>
  <tr>
    <td>transactions.transaction.item.stock</td>
    <td>int(20)</td>
	<td>Y</td>
    <td> 店内商品,在卖数量 </td>
  </tr>
  <tr>
    <td>transactions.transaction.item.custom</td>
    <td>int(20)</td>
	<td>N</td>
    <td> 店内商品,custom ,自定义的反馈字段 </td>
  </tr>
  <tr>
    <td>transactions.transaction.item.store_id</td>
    <td>int(20)</td>
	<td>Y</td>
    <td> 店铺编号,store_id </td>
  </tr>
  <tr>
    <td>transactions.transaction.item.seller_id</td>
    <td>int(20)</td>
	<td>Y</td>
    <td> 卖家编号 ,seller_id </td>
  </tr>
  <tr>
    <td>transactions.transaction.created</td>
    <td> int(20) </td>
	<td>Y</td>
    <td> 订单生成日期 </td>
  </tr>
  <tr>
    <td>transactions.transaction.quantity_purchased</td>
    <td> int(20) </td>
	<td>Y</td>
    <td> 购买数量 </td>
  </tr>
  <tr>
    <td>transactions.transaction.platform</td>
    <td> str(100) </td>
	<td>N</td>
    <td> 平台 </td>
  </tr>
  <tr>
    <td>transactions.transaction.title</td>
    <td> str(200) </td>
	<td>Y</td>
    <td> 订单 商品标题, item.title + (props) + (sn)</td>
  </tr>
<tr>
    <td>transactions.transaction.property_id</td>
    <td>str(100)</td>
	<td>N</td>
    <td> 所选的商品, property_id 属性 </td>
  </tr>
    <tr>
    <td>transactions.transaction.status</td>
    <td> int(20) </td>
	<td>Y</td>
    <td> 订单 状态 </td>
  </tr>
    <tr>
    <td>transactions.transaction.transaction_price</td>
    <td> float(20) </td>
	<td>Y</td>
    <td> 订单 商品价 </td>
  </tr>
  <tr>
    <td>transactions.transaction.shipping_cost</td>
    <td>float</td>
	<td>Y</td>
    <td> 运费 </td>
  </tr>
    <tr>
    <td>transactions.transaction.currency</td>
    <td> int(20) </td>
	<td>Y</td>
    <td> 订单 商品 货币 </td>
  </tr>
  <tr>
    <td>buyer</td>
    <td> array(), 单行 </td>
	<td>Y </td>
    <td>买家信息 </td>
  </tr>
  <tr>
    <td>buyer.shipping_address.email</td>
    <td>str(100) </td>
	<td>Y </td>
    <td>email </td>
  </tr>
<tr>
    <td>buyer.shipping_address.gender</td>
    <td>str(10) </td>
	<td>N </td>
    <td>gender: Mr,Ms </td>
  </tr>
  <tr>
    <td>buyer.shipping_address.first_name</td>
    <td>str(100) </td>
	<td>Y </td>
    <td>first_name </td>
  </tr>
  <tr>
    <td>buyer.shipping_address.last_name</td>
    <td>str(100) </td>
	<td>Y </td>
    <td>last_name </td>
  </tr>
  <tr>
    <td>buyer.shipping_address.company</td>
    <td>str(100) </td>
	<td>N </td>
    <td>company </td>
  </tr>
  <tr>
    <td>buyer.shipping_address.cityname</td>
    <td>str(100) </td>
	<td>N </td>
    <td>cityname </td>
  </tr>
  <tr>
    <td>buyer.shipping_address.stateorprovince</td>
    <td>str(100) </td>
	<td>N </td>
    <td>stateorprovince </td>
  </tr>
  <tr>
    <td>buyer.shipping_address.country</td>
    <td>str(100) </td>
	<td>Y</td>
    <td>country </td>
  </tr>
  <tr>
    <td>buyer.shipping_address.countryname</td>
    <td>str(100) </td>
	<td>N </td>
    <td>countryname </td>
  </tr>
  <tr>
    <td>buyer.shipping_address.street1</td>
    <td>str(100) </td>
	<td>Y</td>
    <td>street1 </td>
  </tr>
   <tr>
    <td>buyer.shipping_address.street2</td>
    <td>str(100) </td>
	<td>N </td>
    <td>street2 </td>
  </tr> 
  <tr>
    <td>buyer.shipping_address.postalcode</td>
    <td>str(100) </td>
	<td>N </td>
    <td>postalcode </td>
  </tr>
    <tr>
    <td>buyer.shipping_address.phone</td>
    <td>str(100) </td>
	<td>N </td>
    <td>phone </td>
  </tr>

</table>
<div> <a href="#top" class="gotop">^Top</a> 
	<hr />
</div>
<h3><a name="GetTags">GetTags</a></h3>
<div><p> 请求 店铺内 Tags  </p></div>
<h4><a name="GetTagsRequest">GetTagsRequest</a></h4>
<div><p> 请求 店铺内 Tags  api.</p></div>
<table width="98%" border="1" class="fieldstable">
  <tr>
    <th scope="col" width="150">字段名</th>
    <th scope="col" width="150">字段属性</th>
    <th scope="col" >详细</th>
  </tr>
  <tr>
    <td>RunName</td>
    <td>str(100)</td>
    <td>  </td>
  </tr>
</table>
<p>&nbsp;</p>
<h4><a name="GetTagsResponse">GetTagsResponse</a></h4>
<table width="98%" border="1">
  <tr>
    <th scope="col" width="150">字段名</th>
    <th scope="col" width="150">字段属性</th>
    <th scope="col" >详细</th>
  </tr>
  <tr>
    <td>Ack</td>
    <td>str</td>
    <td>Success ,成功 . Fail 失败</td>
  </tr>
  <tr>
    <td>Tags</td>
    <td>Array 多行 </td>
    <td>  Tag 数组 </td>
  </tr>
  <tr>
    <td>Tags.tag_id</td>
    <td>str(10)</td>
    <td> Tag Id </td>
  </tr>
  <tr>
    <td>Tags.name</td>
    <td>str(200)</td>
    <td> Tag 名 </td>
  </tr>
  <tr>
    <td>hardexpirationtime</td>
    <td>time</td>
    <td> session 过期时间  </td>
  </tr>
</table>

<div> <a href="#top" class="gotop">^Top</a> 
	<hr />
</div>
</body>
</html>
